package ui.mainscreen;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JPanel;

/**
 * Панель главного меню
 * 
 * @author Anton Nesterov
 */
public class MenuPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	public final MenuButton menuNewButton = new MenuButton("Новая игра");
	public final MenuButton menuLoadButton = new MenuButton("Загрузка");
	public final MenuButton menuOptionButton = new MenuButton("Опции");
	public final MenuButton menuCreatorButton = new MenuButton("Создатели");
	public final MenuButton menuExitButton = new MenuButton("Выход");

	public MenuPanel() {
		setOpaque(false);
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		setBorder(BorderFactory.createEmptyBorder(12, dim.width / 20, 12, 12));

		BoxLayout boxMenu = new BoxLayout(this, BoxLayout.Y_AXIS);
		setLayout(boxMenu);

		add(Box.createVerticalGlue());
		add(menuNewButton);
		add(Box.createVerticalStrut(20));
		add(menuLoadButton);
		add(Box.createVerticalStrut(20));
		add(menuOptionButton);
		add(Box.createVerticalStrut(20));
		add(menuCreatorButton);
		add(Box.createVerticalStrut(20));
		add(menuExitButton);
		add(Box.createVerticalGlue());
	}
}
